﻿namespace ApiGateway.Interface
{
    /// <summary>
    /// 用户身份标识
    /// </summary>
    public interface IUserIdentityCollect
    {
        /// <summary>
        /// 是否启用身份标识
        /// </summary>
        bool IsEnableIdentity { get; }
        /// <summary>
        /// 初始化身份标识并检查权限
        /// </summary>
        /// <param name="identity">身份ID</param>
        /// <param name="path">当前请求资源路径</param>
        void InitIdentity(string identity, string path);
        /// <summary>
        /// 检查身份标识
        /// </summary>
        /// <param name="identityId"></param>
        void CheckIdentity(string identityId);
    }
}